package com.office.automate.employee.data.validator;

import com.office.automate.model.employee.Employee;
import com.office.automate.model.employee.EmployeeOverTime;
import com.office.automate.model.employee.EmployeeQualification;

public class EmployeeDataValidator extends EmployeeBaseDataValidator {

	/**
	 * This method will validate  the basic employee details.
	 * 
	 * @param anEmployee
	 */
	public void validateNewEmployeeRegistrationDetails(Employee anEmployee) {
		
		validateUsername(anEmployee.getUsername());
		
		validatePassword(anEmployee.getPassword());
		
		validateConfirmPassword(anEmployee.getPassword(), anEmployee.getConfirmPassword());
		
		validateSecurityLevel(anEmployee.getSecurityLevel());
		
		validateFirstName(anEmployee.getFirstName());
		
		validateMiddleName(anEmployee.getMiddleName());
		
		validateLastName(anEmployee.getLastName());
		
		validateNicNumber(anEmployee.getNic());
		
		validateEmail(anEmployee.getEmail());
		
		validateNationality(anEmployee.getNationality());
		
		validateAddressLine1(anEmployee.getAddressLine1());
		
		validateAddressLine2(anEmployee.getAddressLine2());
		
		validateCity(anEmployee.getCity());
		
		validateZipCode(anEmployee.getZipCode());
		
		validateSalary(anEmployee.getSalary());
		
		validateDateOfBirth(anEmployee.getDateOfBirth());
		
		validateGender(anEmployee.getGender());
		
		validateCivilStatus(anEmployee.getCivilStatus());
		
		validateDesignation(anEmployee.getDesignationCode());
		
		validateBranch(anEmployee.getBranchId());
		
		validateDivision(anEmployee.getDivisionId());
		
		validateManagerOrSupervisor(anEmployee.getManagerId());
		
		validateCompanyJoinedDate(anEmployee.getCompanyJoinedDate());
		
		validateEmployeeDescription(anEmployee.getEmployeeDescription());

		validateAccountNumber(anEmployee.getAccountNumber());

		validateContactNumber(anEmployee.getContactNo());

		validateBankName(anEmployee.getBankName());

		validatePaymentType(anEmployee.getPaymentType());
		
	}

	/**
	 * This method will validate the employee qualification details.
	 * 
	 * @param anEmployeeQualification
	 */
	public void validateEmployeeQualificationDetails(EmployeeQualification anEmployeeQualification) {

		validateEmployeeNumber(anEmployeeQualification.getEmployeeId());

		validateQualificationDescription(anEmployeeQualification.getDescription());

		validateQualificationType(anEmployeeQualification.getType());

		validateStartAndEndDates(anEmployeeQualification.getStartDate(), anEmployeeQualification.getEndDate());
	}

	public void validateUpdateEmployeeRegistrationDetails(Employee anEmployee) {
		
		validateSecurityLevel(anEmployee.getSecurityLevel());
		
		validateFirstName(anEmployee.getFirstName());
		
		validateMiddleName(anEmployee.getMiddleName());
		
		validateLastName(anEmployee.getLastName());
		
		validateNicNumber(anEmployee.getNic());
		
		validateEmail(anEmployee.getEmail());
		
		validateNationality(anEmployee.getNationality());
		
		validateAddressLine1(anEmployee.getAddressLine1());
		
		validateAddressLine2(anEmployee.getAddressLine2());
		
		validateCity(anEmployee.getCity());
		
		validateZipCode(anEmployee.getZipCode());
		
		validateSalary(anEmployee.getSalary());
		
		validateDateOfBirth(anEmployee.getDateOfBirth());
		
		validateGender(anEmployee.getGender());
		
		validateCivilStatus(anEmployee.getCivilStatus());
		
		validateDesignation(anEmployee.getDesignationCode());
		
		validateBranch(anEmployee.getBranchId());
		
		validateDivision(anEmployee.getDivisionId());
		
		validateManagerOrSupervisor(anEmployee.getManagerId());
		
		validateCompanyJoinedDate(anEmployee.getCompanyJoinedDate());
		
		validateEmployeeDescription(anEmployee.getEmployeeDescription());

		validateAccountNumber(anEmployee.getAccountNumber());

		validateContactNumber(anEmployee.getContactNo());

		validateBankName(anEmployee.getBankName());

		validatePaymentType(anEmployee.getPaymentType());
	}

	public void validateEmployeeOTRequestDetails(EmployeeOverTime employeeOverTime) {
		// TODO Auto-generated method stub
		
	}
}
